<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>

<body>
    <div id="app">
        <lay_head>

        </lay_head>

    </div>
    <script>
        Vue.component("lay_head", {
            template: `
                <div>
                    <div>{{msg}}</div>
                    <button @click="show">test</button>
                </div>
            
            `,
            data(){
                return{
                    msg:"hello 111"
                }
            },
            methods:{
                show(){
                    alert(this.msg)
                    console.log(this.$parent)
                }
            }
        })
        new Vue({
            el: "#app",
            data: {
                msg: "hello Vue"

            },
            methods: {
                

            },
        })
    </script>

</body>

</html>